package com.yxy.ms.manager.common;

import java.io.Serializable;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
/**
 * <类描述>排序
 * 
 * @author yangcheng6327
 *
 */
public class Order implements Serializable{
    
    /**
     * 
     */
    private static final long serialVersionUID = -2430768895765047656L;
    /**
     * 排序字段
     */
    private String orderKey;
    /**
     * 排序方式
     */
    private Direction orderDirection = Direction.ASC;

    /**
     * 排序
     */
    private String orderDirectionValue;

    public Order(String orderKey) {
        this.orderKey = orderKey;
        this.orderDirectionValue = orderDirection.name();
    }

    public Order(Direction orderDirection) {
        this.orderDirection = orderDirection;
        this.orderDirectionValue = orderDirection.name();
    }

    public Order(String orderKey, Direction orderDirection) {
        this.orderKey = orderKey;
        this.orderDirection = orderDirection;
        this.orderDirectionValue = orderDirection.name();
    }


}
